<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>企业页面</title>
    <jsp:include page="${pageContext.request.contextPath}/common/css.jsp" />
</head>


<body>

    <div class="container">
        <div class="row">
            <ol class="breadcrumb">
                <li><a href="#">主页</a></li>
                <li><a href="#">企业列表</a></li>
                <li><a class="active">修改企业</a></li>
            </ol>
        </div>
        <div class="row">
            <form class="form-horizontal" action="${pageContext.request.contextPath}/company/update" method="post">
                <div class="form-group">
                    <label for="id" class="col-sm-2 control-label">企业编号</label>
                    <div class="col-sm-10">
                        <input type="text" name="id" class="form-control" id="id" value="${company.id}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="name" class="col-sm-2 control-label">企业名称</label>
                    <div class="col-sm-10">
                        <input type="text" name="name" class="form-control" id="name" placeholder="企业名称"
                               value="${company.name}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="name" class="col-sm-2 control-label">企业LOGO</label>
                    <div class="col-sm-10">
                        <c:if test="${not empty company.logo}">
                            <img src="${pageContext.request.contextPath}${company.logo}" class="img-rounded" width="140" title="${company.name}">
                        </c:if>
                        <input type="hidden" name="logo" class="form-control" id="logo" placeholder="企业名称"
                               value="${company.logo}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="city" class="col-sm-2 control-label">所在城市</label>
                    <div class="col-sm-10">
                        <input type="text" name="city" class="form-control" id="city" placeholder="所在城市"
                               value="${company.city}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="sourceId" class="col-sm-2 control-label">信息来源</label>
                    <div class="col-sm-10">
                        <%--<input type="text" name="source" class="form-control" id="source" placeholder="信息来源"
                               value="${company.source}">--%>
                        <select id="sourceId" name="sourceId" class="form-control">
                            <option value="1" <c:if test="${company.sourceId eq 1}">selected</c:if>>网络</option>
                            <option value="2" <c:if test="${company.sourceId eq 2}">selected</c:if>>QQ/微信</option>
                            <option value="3" <c:if test="${company.sourceId eq 3}">selected</c:if>>电话</option>
                            <option value="4" <c:if test="${company.sourceId eq 4}">selected</c:if>>其它</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="information" class="col-sm-2 control-label">详细信息</label>
                    <div class="col-sm-10">
                        <textarea name="information" class="form-control" id="information"
                                  rows="3">${company.information}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="updateTime" class="col-sm-2 control-label">上次更新时间</label>
                    <div class="col-sm-10">
                        <input type="text" name="updateTime" class="form-control" id="updateTime"
                               value="${company.updateTime}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default">修改</button>
                        <button type="button" class="btn btn-default" onclick="javascript:history.back();">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <jsp:include page="${pageContext.request.contextPath}/common/js.jsp"/>
</body>
</html>
